package ink.yql.dao;

import ink.yql.model.TeamUser;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author YQL
 */
@Mapper
public interface TeamUserDao {

    @Select("select * from team_user where tid = #{tid}")
    List<TeamUser> getByTid(@Param("tid") Integer tid);

    @Select("select * FROM  team_user where uid= #{uid}")
    List<TeamUser> getByUid(@Param("uid") Integer uid);

    @Insert("insert into team_user (tid,uid)values (#{tid},#{uid})")
    Integer addOne(TeamUser teamUser);

    @Delete("delete from team_user where uid = #{uid} and tid = #{tid}")
    Integer delete(TeamUser teamUser);
}
